package com.atguigu.springcloud.service;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "CLOUD-PROVIDER-PAYMENTHYSTRIX",fallback = PaymentServiceImpl.class)
public interface PaymentService {

    @GetMapping("/payment/hystrix/{id}")
    public String getOk(@PathVariable(value = "id") Integer id);

    @GetMapping("/payment/hystrixerror/{id}")
    public String hystrixerror(@PathVariable(value = "id") Integer id);


}
